package cn.com.bluemoon.daps.model.vo;

import cn.com.bluemoon.daps.common.domain.UserPermissionApi;
import cn.com.bluemoon.daps.model.entity.DapDataModelTableForeignKey;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
@Data
public class SingleForeignKeyVo implements UserPermissionApi {

    @ApiModelProperty("id")
    private String id;

    @ApiModelProperty("主表模型id")
    @NotNull(message = "主表模型id不能为空")
    private String modelId;

    @ApiModelProperty("主表id")
    @NotNull(message = "主表id不能为空")
    private String modelTableId;

    @ApiModelProperty("主表字段id")
    @NotNull(message = "主表字段id不能为空")
    private String modelTableFieldId;

    @ApiModelProperty("副表模型id")
    @NotNull(message = "副表模型id不能为空")
    private String referenceModelId;

    @ApiModelProperty("副表id")
    @NotNull(message = "副表id不能为空")
    private String referenceTableId;

    @ApiModelProperty("副表字段id")
    @NotNull(message = "副表字段id不能为空")
    private String referenceFieldId;

    @ApiModelProperty("关系")
    @NotNull(message = "表间关系不能为空")
    private String relation;

    @Override
    public Serializable getUserPermissionKeyValue() {
        return modelId;
    }
}
